<div class="content-panel mailbox" ng-init="init();">
    <div class="header">
        <div class="title" ng-bind="'mailbox.main_title' | translate"></div>
        <div class="close-btn" ng-click="close();">
            <img src="image/smes_v340/close.png"></img>
        </div>
    </div>
    <div class="mailbox-condition">
        <div class="input-component">
            <input type="text" ng-keypress="key_input($event)" ng-model="condition.value">
            <div class="icon" ng-click="search()">
                <img src="image/smes_v340/W_Com_Search_nor_32.png"" alt="">
            </div>
        </div>
        <button class="refresh-btn" ng-click="refresh();">
            <!-- 20221024 modify by Alan for#120994 : 更換icon -->
            <img src="image/smes_v340/W_Com_Reload_nor_32.png"></img> 
        </button>
    </div>
    <div class="slight-type_content" ng-if="showSlight();">
        <div class="slight-type_item" ng-repeat="(type_no, count) in slight_details"
            ng-class="{'is-selected':type_no == filterItem.slight_type_no}" ng-click="selectSlightType(type_no);">
            <label class="title" ng-bind="'mailbox.slight_type.t_' + type_no | translate"></label>
            <label class="count" ng-bind="count"></label>
            <div class="kmi-can-click"></div>
        </div>
    </div>
    <div class="sub-menu-list perfect-scrollbar">
        <div class="sub-menu-item" ng-repeat="item in getPages(mailList, PageConfig, filterItem) | orderBy: '!send_date' track by $index"
             ng-class="[{'isSelected': item.isSelected, 'isReading': item == selectItem, 'isNew': item.status=='Y', 'level2':item.slight_state == 2, 'level1':item.slight_state == 1}, getLight(item.urgency)]">
             <div class="sub-menu-item__check-btn" ng-click="itemSelect(item, $event);">
                 <i class="material-icons select">check_box</i>
                 <i class="material-icons deselect">check_box_outline_blank</i>
                 <div class="kmi-can-click"></div>
             </div>
             <div class="sub-menu-item__content">
                <div class="kmi-text-fields">
                    <i class="slight-icons material-icons">warning</i>
                    <div  class="slight-type_name" ng-bind="'mailbox.slight_type.t_' + item.slight_type_no | translate"></div>
                    <div  class="tag-content">
                        <div ng-repeat="tag in item.tags" class="tag-item" ng-bind="tag.name"></div>
                    </div>
                    <label class="date" ng-bind="dateFormat(item.send_date)"></label>
                </div>
                <div class="kmi-text-fields">
                    <label class="title" ng-bind="item.content"></label>
                </div>
            </div>
            <div class="kmi-can-click" ng-click="itemClick(item);" ></div>
        </div>
    </div>
    <div class="page-content">
        <div class="page-icon">
            <img src="image/icons/dropleft.png"></img>
            <div class="kmi-can-click"  ng-click="PageConfig.page = (PageConfig.page-1<0?0:PageConfig.page-1);"></div>
        </div>
        <label ng-bind="(PageConfig.page +1)+' / '+PageConfig.total_page"></label>
        <div class="page-icon">
            <img src="image/icons/dropright.png"></img>
            <div class="kmi-can-click"  ng-click="PageConfig.page = (PageConfig.page+1>(PageConfig.total_page-1)?(PageConfig.total_page-1):PageConfig.page+1);"></div>
        </div>
    </div>
    <div class="split-line"></div>
    <div class="btn-list">
        <div class="btn-item" ng-if="!isSelecting();" ng-click="selectAll();">
            <!-- <img src="image/icons/mail_add.png"></img> -->
            <i class="material-icons">check_box</i>
            <label ng-bind="'mailbox.btn.selectAll' | translate"></label>
            <div class="kmi-can-click"></div>
        </div>
        <div class="btn-item" ng-if="isSelecting();" ng-click="deselectAll();">
            <i class="material-icons">check_box_outline_blank</i>
            <label ng-bind="'mailbox.btn.cancel' | translate"></label>
            <div class="kmi-can-click"></div>
        </div>
        <div class="btn-item" ng-if="!isSelecting();" ng-click="writeMail();">
            <img src="image/icons/mail_add.png"></img>
            <label ng-bind="'mailbox.btn.add' | translate"></label>
            <div class="kmi-can-click"></div>
        </div>
        <div class="btn-item" ng-if="isSelecting();" ng-click="deleteMail();">
            <img src="image/icons/mail_delete.png"></img>
            <label ng-bind="'mailbox.btn.delete' | translate"></label>
            <div class="kmi-can-click"></div>
        </div>
        <!-- 20190528 暫時先關閉封存功能
        <div class="btn-item" ng-if="isSelecting();" ng-click="sealMail();">
            <img src="image/icons/mail_seal.png"></img>
            <label ng-bind="'mailbox.btn.seal' | translate"></label>
            <div class="kmi-can-click"></div>
        </div>
        -->
    </div>
</div>
